package com.xin;

public class APP {
    public static void main(String[] args) {

        System.out.println("========懒汉模式-start========");
        Singleton1 l1 = Singleton1.getSinglegton();
        Singleton1 l2 = Singleton1.getSinglegton();
        boolean c = l1==l2;
        System.out.println("l1 = l2 is: "+ c);
        System.out.println("========懒汉模式-end========");

        System.out.println("========饿汉模式-start========");
        Singleton1 e1 = Singleton1.getSinglegton();
        Singleton1 e2 = Singleton1.getSinglegton();
        boolean f = e1==e2;
        System.out.println("e1 = e2 is: "+ f);
        System.out.println("========饿汉模式-end========");

    }
}
